<template>
	<view>
		<u-navbar title="车辆维修" bgColor="#3083FB" titleStyle="color:#fff" left-icon-color="#fff" :autoBack="true"
			placeholder></u-navbar>
		<view class="bgc"></view>
		<!-- 车辆维修 -->
		<view class="content">
			<map style="width: 600rpx; height: 800rpx;" :latitude="latitude" :longitude="longitude" :markers="covers">
			</map>
		</view>
		<view class="body">
			<header>
				<text class="headerLeft">伟业汽车维修厂</text>
				<text class="headerRight">40m</text>
			</header>
			<view class="center">
				<view class="left">
					<view class="star">
						<u-rate :count="count" :value="current" :readonly="true"></u-rate>
					</view>
					<text>{{current}}分</text>
					<view class="text">
						营业时间:周一至周五 早上8:00-晚上22:00
					</view>
					<view class="text">
						位置:山阳区人民路与解放路交叉口
					</view>
				</view>
				<view class="right">
					<image src="../../static/logo.png" mode="aspectFit"></image>
				</view>
			</view>
			<view class="bottom">
				<u-button type="primary" shape="circle" size="medium" @click="show = true"><u-icon name="phone"
						color="#fff" size="22"></u-icon>联系门店</u-button>
				<u-button type="error" shape="circle" size="medium" @click="toReservation"><u-icon name="clock" color="#fff"
						size="22"></u-icon>立即预定</u-button>
			</view>
			<u-popup :show="show" mode="bottom" mask-close-able="true" @close="close" @open="open">
				<view class="isShow">
					<view class="son">18642589456</view>
					<u-line color="red"></u-line>
					<view class="son">复制</view>
					<u-line color="red"></u-line>
					<view @click="close" class="son">取消拨号</view>
				</view>

			</u-popup>
		</view>
		<navigator url="/pages/CarRepair/NearbyStores">附近门店</navigator>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				count: 5,
				current: 4,
				show: false,

				id: 0, // 使用 marker点击事件 需要填写id
				title: 'map',
				latitude: 39.909,
				longitude: 116.39742,
				covers: [{
					latitude: 39.909,
					longitude: 116.39742,
					// iconPath: '../../../static/location.png'
				}, {
					latitude: 39.90,
					longitude: 116.39,
					// iconPath: '../../../static/location.png'
				}]
			};
		},
		methods: {
			close() {
				this.show = false
			},
			open() {
				this.show = true
			},
			toReservation(){
				wx.navigateTo({
					url:"/pages/CarRepair/Reservation"
				})
			}
		},

	}
</script>

<style lang="scss">
	.bgc {
		background-color: #3083FB;
		height: 300rpx;
		margin-top: -6rpx;
	}

	.content {
		width: 80%;
		height: 600rpx;
		margin: 0 auto;
		margin-top: -250rpx;
		// border: 1px solid red;
		background-color: #fff;
		border-radius: 20rpx;
	}

	.body {
		padding: 40rpx 10%;
		margin: 0 auto;
		margin-top: 200rpx;
		// margin-top: -150rpx;
		// border: 1px solid red;
		background-color: #fff;
	}

	header {
		margin-bottom: 20rpx;
	}

	.center {
		// border: 1px solid red;
		height: 200rpx;
	}

	.headerRight {
		float: right;
	}

	.star {
		// display: inline;

		float: left;
	}

	.left {
		float: left;
		// border: 1px solid red;
		width: 70%;
		height: 150rpx;
	}

	.text {
		font-size: 22rpx;
	}

	// .right {}

	.right image {
		float: right;
		width: 28%;
		height: 150rpx;
		// border: 1px solid red;
	}

	.bottom {
		// border: 1px solid red;
		display: flex;
		justify-content: space-between;
	}

	.isShow{
		height: 300rpx;
		
	}
	.son{
		height: 100rpx;
		font-size: 40rpx;
		line-height: 100rpx;
		text-align: center;
	}
</style>